package cn.duyo.spring.context;

import cn.duyo.spring.beans.BeansException;

/**
 * ConfigurableApplicationContext ——> ApplicationContext -> ListableBeanFactory -> BeanFactory
 *
 * @author du
 */
public interface ConfigurableApplicationContext extends ApplicationContext {

    /**
     * 刷新容器
     *
     * @throws BeansException
     */
    void refresh() throws BeansException;

    /**
     * 注册优雅关机钩子
     */
    void registerShutdownHook();

    /**
     * (手动)执行关闭容器
     */
    void close();

}
